<?php

return array(
	'searchColumns' => Yii::app()->adminUser->role != AdminUser::ROLE_OPERATOR ?  false : array(
		'fatid' => array('dropDownList', Yii::app()->enum->options('finance.financeAccountType')),
		'worker_id' => array('dropDownList', Yii::app()->enum->options('worker.worker')),
	),
	'dataColumns' => array(
		'accountType.ftname',
		array(
			'name' => 'worker.worker_name',
			'visible' => 'Yii::app()->adminUser->role == AdminUser::ROLE_OPERATOR',
		),
		'account',
		array(
			'class' => 'ButtonColumn',
			'header' => '操作',
			'template' => '{update} {delete} {view}',
			'buttons' => array(
				'update' => array(
					'visible' => '$data->worker_id == Yii::app()->adminUser->id'
				),
				'delete' => array(
					'visible' => '$data->worker_id == Yii::app()->adminUser->id'
				),
			),
		),
	),
	'_import' => array(
		array('*', 'actions.admin//*'),
	),
);
?>